<template>
  <div class="flex-center">
    <router-link
      active-class="active-class"
      v-for="link in linkList"
      :to="link.path"
      class="router-link"
      :key="link.path"
    >
      <svg-icon
         :style="{width:17,height:17}"
         :icon-class="$route.path===link.path?link.activeClass:link.iconClass">
      </svg-icon>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'switchButton',
  props: {},
  data() {
    return {
      linkList: [
        {
          path: '/apps',
          iconClass: 'applaycation',
          activeClass: 'activeApplaycation',
        },
        {
          path: '/files',
          iconClass: 'files',
          activeClass: 'activeFiles',
        },
      ],
    };
  },
  components: {},
};
</script>

<style lang='scss' scoped>
.flex-center {
  display: flex;
  flex-direction: column;

  height: 100%;
}
.active-class {
  background-color: #e5f0ff;
}
.router-link {
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  &:hover {
    background-color: #f0f4f8;
  }
}
</style>
